<?php
/**
 *-------------------------------------------------------------------------p*
 *
 *-------------------------------------------------------------------------h*
 * @copyright  Copyright (c) 2015-2022 Shopwwi Inc. (http://www.shopwwi.com)
 *-------------------------------------------------------------------------c*
 * @license    http://www.shopwwi.com        s h o p w w i . c o m
 *-------------------------------------------------------------------------e*
 * @link       http://www.shopwwi.com by 象讯科技 phcent.com
 *-------------------------------------------------------------------------n*
 * @since      shopwwi象讯·PHP商城系统Pro
 *-------------------------------------------------------------------------t*
 */

use app\model\User;

return [
    'enable' => true,
    'app_key' => 'D62sE5QQbEiFfi4kcnEDBD9HZKQF41FRzh0J2HkapMxTYQDDwpJN2HABFs2QexmK',
    'guard' => [
        'user' => [
            'key' => 'id',
            'field' => ['id', 'ulid', 'ip'], //设置允许写入扩展中的字段
            'num' => 1, //-1为不限制终端数量 0为只支持一个终端在线 大于0为同一账号同终端支持数量 建议设置为1 则同一账号同终端在线1个
            'model' => User::class
        ]
    ],
    'jwt' => [
        'redis' => true,
        // 算法类型 ES256、HS256、HS384、HS512、RS256、RS384、RS512
        'algorithms' => 'HS256',
        // access令牌秘钥
        'access_secret_key' => 'MQdmzK1Psizn2rwc7wHCRWmkCRDkSEYwjGWPr5iK57PzpDaAxRWNc1DCZwF4k6hR',
        // access令牌过期时间，单位秒。默认 30 分钟
        'access_exp' => 30 * 60,
        // refresh令牌秘钥
        'refresh_secret_key' => 'PPhKXYjN2GTjyzrRrpybEKF06wmEFAwfFB50i5faJPaEiTD8JRGK0cHmrTKyTTj3',
        // refresh令牌过期时间，单位秒。默认 7 天
        'refresh_exp' => 7 * 24 * 60 * 60,
        // 令牌签发者
        'iss' => 'biqi',
        // 令牌签发时间
        'iat' => time(),

        /**
         * access令牌 RS256 私钥
         * 生成RSA私钥(Linux系统)：openssl genrsa -out access_private_key.key 1024 (2048)
         */
        'access_private_key' => <<<EOD
-----BEGIN RSA PRIVATE KEY-----
MIIEogIBAAKCAQEAwxSck1DxSpGfi6Rb411a9TTZFh+eZbfOP6URqTIqB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l3pG/v5taHIbc092w54ZnFts+Z
f/9+ouy2IyfXg3oHxXnUfcrehj5yBxgMRh3z98ZyUxaU7wvA66pAQ+wMzKMaZo+w
CvbGFjwsVKees7GMSpIMsQKBgHyCsTk+zfo2dPM4pshS/SltWYIqr2f0aKZP4+nl
l7fsewh+zUBvx2NMxFs1Nt1fGSy7GEFm3HN5EvlgV3/f7bjsCIZYe8TV4gzMng23
zS1B0Ci31cQ7a38J80IJLWYMyzQ4O2BI07AW35lM8HHbgeoQYV8qrflegIiz/zQa
6NnvAoGACwyDRwngo9YySUDiDnR3Xs84kS9Fl0mOvPrP6WxODI0k1Ub4XaYFRG0T
/gMIykKmSuCi0N7VL/qgdUy/llpiWokG0KCijuy0UxyIXjbNlD30HtryXlHqAeRg
bzyfJ1+OxDATQ0XLM0+Jg89sQMfqHxcEM9b5FObrYch7UnqjNJw=
-----END RSA PRIVATE KEY-----
EOD,
        /**
         * access令牌 RS256 公钥
         * 生成RSA公钥(Linux系统)：openssl rsa -in access_private_key.key -pubout -out access_public_key.key
         */
        'access_public_key' => <<<EOD
-----BEGIN PUBLIC KEY-----
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAwxSck1DxSpGfi6Rb411a
9TTZFh+eZbfOP6URqTIqBXdLOWq1IXOjglGKDLsN1RzRXLjui8NPv4A4wIjer9zg
7et6ARGgh6r2ABaVZbKoqcFITkzEhu58GrHSvEA/vlITneoku8VC2MWHGPhgEZ9w
CZ3zO41qvxDNugNZCUXZB3eWf7I7PkWo4gJ8OEy55Op36Sdtn4TivTUlU5mnNEFq
2wIJDIl7HSbFd3zzkk9EUJ6VViFcNn1AskD927SGWSvHYeeWSg6SMzH79vi1qLdv
ZkRNVVzwQyQaFC8BK2lpitiWVcja3y6vTryTiPO0tKmgQvLPC0ZksQ/BQJRD9eeI
/wIDAQAB
-----END PUBLIC KEY-----
EOD,

        /**
         * refresh令牌 RS256 私钥
         * 生成RSA私钥(Linux系统)：openssl genrsa -out refresh_private_key.key 1024 (2048)
         */
        'refresh_private_key' => <<<EOD
-----BEGIN RSA PRIVATE KEY-----
MIIEogIBAAKCAQEAmCV/L3NzfIh4h0bd8l6eLN3qMDyfWzEEdHx6UWYFY9EyOYfx
XR9LOofCvLaIcnvI/pMaInOlSI+aMVewXYG1YVgJIeJbc/BxdgPfG2J1HUnNeSKZ
lrhHuLdDWH1YmQedoSyoEEh3H+Jtr42kAUwIdiQqiw1aIxStJwJECWj45OXBgubt
YC0MTERyau77tAg0+I1MxdVGAer8Jl89FNqEOde+X+ElDlxu0sN4fbwZHkap64Vw
UdhB2nwwfC4vHKx9xlUsmVAJVWCsfnZCviT9UlCzuBvjkF6oGnMptiVY3b/OxHhW
NHIN5Koc2+VP8HER6WPu4jo4ChmNL4IYwN2kFQIDAQABAoIBAEZukU6jmPIs8PLa
rRMulvW5M1jqL3EVI3VTTIKTAmq/ZIs6cdMEkhxBzbXzn/2zbQvgiCgrtfd9tskh
yVy4F4G9MdkUQvbMd5HE4Ar6zLFmwW5SxJv/qgAKImx79kA9RMzgcdq72R2TAejT
XnlVO9OJEYK2hyQXRcL5qwpaJGI9fVgQ0aeRfnNdUUnGIXBWXRjAExy2Lkg0ETht
ArEUflSBaY5Y2rww8/67XZcFygmFlUBnjRkzHMeiWI2mwKHOv31HGquKkXBKWDkv
k5worXhZmqOpq6X/HkNOc5vQFae8ZktnGC2O2ix0x283ACgMRC0+Wht5+vhK0b4H
UZgc838CgYEAx3aTUDPQKCDXjxcdMkAw0JkhrSSIwn9kx58LMxhb2/5ZY7buDPnF
GyR2rxMMvpSEl7QJydvPowKcIjqQiydBwKCvpfzNQfcpWHtbkIH1HYt9x3HxQnts
kTY++3jnlHa/T61WKvQp0tROq4t+r0VTu+b1MfmSFbIOwqVPxpdkshMCgYEAw0WI
ED/ILXod9N2DchJg5WUX9fIISY23+3lsrWXy2dLA2aoHybGwxT1TyrvpT3b0+d5e
oaqFb/eoBmRaW1B5R4peEWm9qhWwJSWDLcV+cudOS/1cGoFHzTtBAMj4gvZFug2s
3rL8S0mtgi6SsDgvDMd3eyf78SoLIwgeP/UTVjcCgYA30jp19popsM9Cz2AvYQGI
T2K6VwAjFo34w8zZltaWYb9YhahnXztHVlQUuQsXBu94mT0oDek1IJTbi3JKT0k6
hH3DwVUcQfSDO7qrXYNgqlogCAZR6cK/fOPxcqu0w+rUfJkh2kUeKKZ/ocFpgchm
TMOQId09TyCMXsFNva7DmwKBgB1Eq7s7xCZE2n6cQRp09L8NYwUDLQjRTBVOQuLO
mBLcCvnVCWvKzWMS6R9HARZfDyLwmKCErZF1vmKO4hgzvKnjbGwRvFLlA0zeDYZr
xqM0VkD/jbGPVRLG4dxbQxxmC1dyu0l57GTgezg7ANOW6D5zG06DVLj2A0tR6S7O
7gILAoGAMvQLD1fjCXjioXy7iVJlNSuiI3Qu8H0c/IaLBq3WVNOo9DLGP5Sq//Io
lTx739BSgM+aXVCIL2HLGi/Uq7teaqhFmYc74ULKzTHnuVmRClhtwHp4pOaAxSa3
Fs1s5S2MZnmQqeGOUv3RyquEeKdkEpdXVmooFFmYB3/FgpM4E0U=
-----END RSA PRIVATE KEY-----
EOD,
        /**
         * refresh令牌 RS256 公钥
         * 生成RSA公钥(Linux系统)：openssl rsa -in refresh_private_key.key -pubout -out refresh_public_key.key
         */
        'refresh_public_key' => <<<EOD
-----BEGIN PUBLIC KEY-----
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAmCV/L3NzfIh4h0bd8l6e
LN3qMDyfWzEEdHx6UWYFY9EyOYfxXR9LOofCvLaIcnvI/pMaInOlSI+aMVewXYG1
YVgJIeJbc/BxdgPfG2J1HUnNeSKZlrhHuLdDWH1YmQedoSyoEEh3H+Jtr42kAUwI
diQqiw1aIxStJwJECWj45OXBgubtYC0MTERyau77tAg0+I1MxdVGAer8Jl89FNqE
Ode+X+ElDlxu0sN4fbwZHkap64VwUdhB2nwwfC4vHKx9xlUsmVAJVWCsfnZCviT9
UlCzuBvjkF6oGnMptiVY3b/OxHhWNHIN5Koc2+VP8HER6WPu4jo4ChmNL4IYwN2k
FQIDAQAB
-----END PUBLIC KEY-----
EOD,
    ],
];
